package com.zhangsr.zus.rpc.api;

import java.io.Serializable;

/**
 * @Author: zhangsr
 */
public interface Result extends Serializable {

    /**
     * Recreate.
     * <p/>
     * <code>
     * if (hasException()) {
     * throw getException();
     * } else {
     * return getValue();
     * }
     * </code>
     *
     * @return result.
     * @throws if has exception throw it.
     */
    Object recreate() throws Throwable;
}
